<template>
    <h1>test</h1>
    <div>
      <van-button type="primary">主要按钮</van-button>
      <van-button type="success">成功按钮</van-button>
      <van-button type="default">默认按钮</van-button>
      <van-button type="warning">警告按钮</van-button>
      <van-button type="danger" @click="clickOk">危险按钮</van-button>
      <div>
        {{data}}
      </div>
    </div>
</template>
<script lang="ts">
import { defineComponent,ref } from 'vue';
import { get,post } from "@/request/useRequest";
export default defineComponent({
  name: 'test',
  setup(){
    const data:any=ref([])
    const clickOk=()=>{
      get('material/list', {
          filter: JSON.stringify({status:1})
      }).then((res:any)=>{
        if(res.status==200){
          data.value=res.data
        }
      })
    }
    return{
      data,
      clickOk
    }
  }
});
</script>
<style lang="less">

</style>